/**********************************************************
 * File description:ExperimentService.h
 * Function:创建实验服务类
 * Current Version: 1.0.0
 * Author: 夏新宇
 * Date: 2022-10-02
 *  -----
 *  Copyright by bokun Software.
 **********************************************************/

#ifndef EXPERIMENTSERVICE_H
#define EXPERIMENTSERVICE_H

#include "QPCRDB.h"

#include <iostream>
#include <QCoreApplication>
#include <QDebug>
#include "SqliteDriver.h"
#include "QPCRDB.h"
#include "Constant.h"
#include "Convertion.h"
class ExperimentService
{
public:
    ExperimentService();
    ~ExperimentService();
    QString createExperiment(Experiment experiment); //创建实验
    void updateReactionVolume(int experimentId,QString reactionVolume); //修改实验扩增程序反应体积
    void update(Experiment experiment); //更新实验信息


    //实验恢复部分
    void updateStateStart(int experimentId); //将实验状态修改成已启动 is_start —— 0 => 1
    void updateStateEnd(int experimentId); //将实验状态修改成已结束 is_end —— 0 => 1


    QList<QHash<QString,QString>> getExperimentList(); //获取启动后并且运行结束的实验信息，按修改时间排序

private:
    QString path;
    SqliteDriver * sqlD;
    Convertion * conv;
};

#endif // EXPERIMENTSERVICE_H
